/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Random;

/**
 * <p>Project: javase2203 - Ex3
 * <p>Powered by webrx On 2022-07-20 09:33:11
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex3 {
    public static void main(String[] args) {
        System.out.println(true ? 1 : 0);
        Random rand = new Random();
        System.out.println(rand.nextBoolean() ? 1 : 0);

        if (Math.random() > .5) {
            System.out.println(1);
        } else {
            System.out.println(0);
        }

        //三元运算符 ? : 表达式
        int a = 6;
        String b = a > 5 ? "yes" : "no";
        System.out.println(b);
    }
}
